package com.baidu.controller;

import com.baidu.constant.MessageConstant;
import com.baidu.pojo.Result;
import com.baidu.service.OrdersettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

@Controller
@ResponseBody
@RequestMapping("/ordersetting")
public class OrdersettingController {

    @Autowired
    private OrdersettingService ordersettingService;

    @RequestMapping("/upload")
    public Result upload(MultipartFile excelFile){
        ordersettingService.upload(excelFile);
        return new Result(true, MessageConstant.IMPORT_ORDERSETTING_SUCCESS);
    }

}
